package com.pmx.mall.order.feign;

import com.pmx.common.utils.R;
import com.pmx.mall.order.vo.OrderItemSpuInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author: permission
 * @Date: 2022/10/3 21:06
 * @Version: 1.0
 * @ClassName: ProductService
 * @Description: 通过feign调用商品服务
 */
// name 属性指明 注册中心中的服务名称
@FeignClient(name = "mall-product")
public interface ProductService {
    /**
     * 需要访问的远程接口
     */
    @GetMapping("/product/brand/all")
    R queryAllBrand();

    @RequestMapping("/product/spuinfo/getOrderItemSpuInfoBySpuId/{spuIds}")
    public List<OrderItemSpuInfoVO> getOrderItemSpuInfoBySpuId(@PathVariable("spuIds") Long[] spuIds);
}
